<html>
	<head>
		<title>Gestione Proiettori</title>
		
		<meta name="author" content="Lorenzo Visentin" />
		
		<link rel="stylesheet" href="css/amm_index.css" type="text/css"/>
		<link rel="stylesheet" href="css/amm_proiettori.css" type="text/css" />
		<script type="text/javascript" src="jQuery/jquery-1.9.1.min.js"></script>
		<script type="text/javascript" src="js/amm_proiettori.js"></script>

		<script type="text/javascript">
			<% if((session.getAttribute("utente")==null) || !((Boolean)(session.getAttribute("amministrativo")))) out.print("window.location=\"index.jsp\";"); %>
		</script>

	</head>
	<body>
		<div id="main">
			<jsp:include page="amm_menu.jsp"/>
			
			<div id="main-div">
				
				<h2>Gestione dei Proiettori</h2>
				
				<div id="menu-proiettori">
					<form id="formTipoAzione">
						<p>Operazioni sui proiettori</p>
						<select id="sceltaTipoAzione" name="tipoAzione">
							<option value="crea">Inserisci nuovo</option>
							<option value="modifica">Cambia sala</option>
							<option value="elenca">Elenca tutti</option>
						</select>
					</form>
				</div>
				<div id="form-proiettori">
				
					<div id="messaggi-utente"></div><br>
					
					<!-- Form di creazione nuovo proiettore -->
					<form id="formCompilazione" action="" onsubmit="return validateCreazione()">
						<table class="form-table" id="tableCompilazione">
							<tr>
								<td><label for="serialePrj">Seriale *</label></td>
								<td><input type="text" id="idSerialePrjComp" name="serialePrj" onBlur="checkSeriale()"></input></td>
							</tr>
							<tr>
								<td><label for="marcaPrj">Marca *</label></td>
								<td><input type="text" id="idMarcaPrjComp" name="marcaPrj" onBlur="checkMarca()"></input></td>
							</tr>
							<tr>
								<td><label for="modelloPrj">Modello *</label></td>
								<td><input type="text" id="idModelloPrjComp" name="modelloPrj" onBlur="checkModello()"></input></td>
							</tr>
							<tr>
								<td><label for="intervPrj">Intervallo manutenzione (in minuti) *</label></td>
								<td><input type="text" id="idIntervPrjComp" name="intervPrj" onBlur="checkIntervallo()"></input></td>
							</tr>
							<tr>
								<td><label for="in3DPrj">In 3D *</label></td>
								<td><input type="checkbox" id="in3DPrjComp" name="in3DPrj"></td>
							</tr>
							<tr>
								<td><label for="salaPrj">Sala *</label></td>
								<td><select id="sceltaSalaPrjComp" name="salaPrj">
									<jsp:include page="../admin/getSaleConSede"/>
								</select></td>
							</tr>
							<tr>
								<td colspan="2"><p>* Campi obbligatori</p></td>
							</tr>
							<tr>
								<td colspan="2" class="center">
									<input id="submitCrea" type="submit" value="Aggiungi nuovo proiettore"></input>
								</td>
							</tr>
						</table>
					</form>
					
					<!-- Form di modifica dati proiettore -->
					<form id="formModifica" action="" onsubmit="return validateModifica()">
						<table class="form-table">
							<tr>
								<td><label for="serialePrj">Seriale</label></td>
								<td><select id="sceltaSerialePrjMod" name="serialePrj" onChange="trovaDatiPrjMod(this)">
									<option value="scegliSeriale" selected="selected">Scegli il codice seriale</option>
									<jsp:include page="../admin/getSerialiProiettori"/>
								</select></td>
							</tr>
							<tr>
								<td><label for="marcaPrj">Marca</label></td>
								<td><input type="text" id="idMarcaPrjMod" name="marcaPrj" disabled="disabled"></input></td>
							</tr>
							<tr>
								<td><label for="modelloPrj">Modello</label></td>
								<td><input type="text" id="idModelloPrjMod" name="modelloPrj" disabled="disabled"></input></td>
							</tr>
							<tr>
								<td><label for="salaPrj">Cambia sala proiettore *</label></td>
								<td><select id="sceltaSalaPrjMod" name="salaPrj">
									<jsp:include page="../admin/getSaleConSede"/>
								</select></td>
							</tr>
							<tr>
								<td colspan="2"><p>* Campi obbligatori</p></td>
							</tr>
							<tr>
								<td colspan="2"><p>Per la manutenzione dei proiettori passa all'apposita scheda.</p></td>
							</tr>
							<tr>
								<td colspan="2" class="center">
									<input id="submitModifica" type="submit" value="Cambia sala proiettore" disabled="disabled"></input>
								</td>
							</tr>
						</table>
					</form>
					
					<!-- Form di elencazione proiettori -->
					<form id="formElenca" action="">
						<table class="form-table">
							<tr>
								<td><label for="serialePrj">Seriale</label></td>
								<td><select id="sceltaSerialePrjElenca" name="serialePrj" onChange="trovaDatiPrjElenca(this)">
									<option value="scegliSeriale" selected="selected">Scegli il codice seriale</option>
									<jsp:include page="../admin/getSerialiProiettori"/>
								</select></td>
							</tr>
							<tr>
								<td><label for="marcaPrj">Marca</label></td>
								<td><input type="text" id="idMarcaPrjElenca" name="marcaPrj" disabled="disabled"></input></td>
							</tr>
							<tr>
								<td><label for="modelloPrj">Modello</label></td>
								<td><input type="text" id="idModelloPrjElenca" name="modelloPrj" disabled="disabled"></input></td>
							</tr>
							<tr>
								<td><label for="intervPrj">Intervallo manutenzione (in minuti)</label></td>
								<td><input type="text" id="idIntervPrjElenca" name="intervPrj" disabled="disabled"></input></td>
							</tr>
							<tr>
								<td><label for="dataLampadinaPrj">Data lampadina</label></td>
								<td><input type="text" id="idDataLampadinaPrjElenca" name="dataLampadinaPrj" disabled="disabled"></input></td>
							</tr>
							<tr>
								<td><label for="in3DPrj">In 3D</label></td>
								<td><input type="checkbox" id="in3DPrjElenca" name="in3DPrj" disabled="disabled"></td>
							</tr>
							<tr>
								<td><label for="salaPrj">Sala</label></td>
								<td><select id="sceltaSalaPrjElenca" name="salaPrj" disabled="disabled">
									<jsp:include page="../admin/getSaleConSede"/>
								</select></td>
							</tr>
						</table>
					</form>
				</div>
				
			</div>
		</div>
	</body>
</html>
